package com.yz.mcd.view.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.yz.mcd.R;

/**
 * Created by Maverick on 2017/4/26.
 */

public class ModeDialog extends Dialog implements View.OnClickListener{

    public ImageView ivCloseDialog;

    public ModeDialog(Context context) {
        this(context, R.style.mode_dialog);
    }

    public ModeDialog(Context context, int themeResId) {
        super(context, themeResId);

        View view = getLayoutInflater().inflate(R.layout.mode_dialog,null);

        ivCloseDialog = (ImageView) view.findViewById(R.id.iv_close_dialog);
        ivCloseDialog.setOnClickListener(this);

        setContentView(view);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_close_dialog:
                dismiss();
                break;
            default:
                break;
        }
    }
}
